/**
 * 
 */
package com.shine.icis.hbean;

import java.io.Serializable;
import java.util.Date;

import org.apache.struts2.json.annotations.JSON;


/**
 * 审批任务
 * @author zsy
 *
 */
public class TaskIns implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1998411859294309098L;
	
	public static char TASK_STATUS_CREATE = 'C';
	public static char TASK_STATUS_START = 'S';
	public static char TASK_STATUS_END = 'E';
	private String taskId;
	private String taskName;//任务名称
	private char taskStatus;//任务状态
	private Date createTime;//到达时间
	private Date startTime;//开始时间
	private Date endTime;//结束时间
	private char viewFlag;//查看标志
	private String comment;//审批意见
	private String actorId;//办理者
	
	private FlowNode flowNode;//流程步骤
	private FlowIns flowIns;//流程实例
	public String getTaskId() {
		return taskId;
	}
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	public String getTaskName() {
		return taskName;
	}
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	public char getTaskStatus() {
		return taskStatus;
	}
	public void setTaskStatus(char taskStatus) {
		this.taskStatus = taskStatus;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public char getViewFlag() {
		return viewFlag;
	}
	public void setViewFlag(char viewFlag) {
		this.viewFlag = viewFlag;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public String getActorId() {
		return actorId;
	}
	public void setActorId(String actorId) {
		this.actorId = actorId;
	}
	@JSON(serialize=false)
	public FlowNode getFlowNode() {
		return flowNode;
	}
	public void setFlowNode(FlowNode flowNode) {
		this.flowNode = flowNode;
	}
	@JSON(serialize=false)
	public FlowIns getFlowIns() {
		return flowIns;
	}
	public void setFlowIns(FlowIns flowIns) {
		this.flowIns = flowIns;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((taskId == null) ? 0 : taskId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final TaskIns other = (TaskIns) obj;
		if (taskId == null) {
//			if (other.taskId != null)
				return false;
		} else if (!taskId.equals(other.taskId))
			return false;
		return true;
	}

	
}

